﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.XtraEditors;
using DevExpress.XtraBars;

namespace UIShare
{
    public class BasicForm : XtraForm
    {
        protected override void OnLoad(EventArgs e)
        {
            ControlHelper.InitControls(this);

            InitFields();

            Events();

            LoadDatas();

            base.OnLoad(e);
        }

        protected virtual void InitFields()
        {

        }

        protected virtual void Events()
        {

        }

        protected virtual void LoadDatas()
        {

        }

        #region ViewState
        private string _viewState;
        public string ViewState
        {
            get { return _viewState; }
            set
            {
                _viewState = value;
                OnViewStateChanged();
            }
        }

        protected virtual void OnViewStateChanged()
        {

        }
        #endregion
    }
}
